<ion-header>
  <ion-navbar class="ion-navbar">
    <ion-title>
      {{pagetitle}}
    </ion-title>
    <ion-buttons end *ngIf="pagetitle=='收银'">
      <button ion-button icon-only (click)="cancelCash()">
        <ion-icon name="exit"></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>
</ion-header>
<ion-content>
  <ion-list>
    <ion-item-group>
      <ion-item-divider color="light" *ngIf="pagetitle=='收银'">点餐详情</ion-item-divider>
      <ion-item-divider color="light" *ngIf="pagetitle!=='收银'">共计 ￥{{sumCount}}</ion-item-divider>
      <button ion-item *ngFor="let item of listDetail">
        <div class="item-detail">
          <div class="header">
            <p class="h2">{{item.foodname}}</p>
            <p class="h3">x{{item.num}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;单价&nbsp;￥{{item.price}}</p>
          </div>
          <div class="price">
            <p class="h3">￥</p>
            <p class="h2">{{item.sumprice}}</p>
          </div>
        </div>
      </button>
    </ion-item-group>
    <ion-item-group *ngIf="pagetitle=='收银'">
      <ion-item-divider color="light">收银结算</ion-item-divider>
      <ion-item ion-item>
        <div class="sum">
          <p class="left">桌号:&nbsp;{{tableName}}</p>
          <p class="right">应收&nbsp;&nbsp;&nbsp;{{sumCount}}</p>
        </div>
      </ion-item>
      <ion-item ion-item>
        <ion-label>支付方式</ion-label>
        <ion-select [(ngModel)]="cashType" class="ion-select-paytype" okText="确定" cancelText="取消">
          <ion-option value="0">现金</ion-option>
          <!--<ion-option value="1">刷卡</ion-option>-->
          <ion-option value="2">扫码支付</ion-option>
          <!--<ion-option value="3">其他</ion-option>-->
        </ion-select>
      </ion-item>
      <ion-item ion-item>
        <ion-label floating>{{receive}}</ion-label>
        <ion-input type="number" (ionChange)="countBal()" [(ngModel)]="realGet" class="ion-input-real"></ion-input>
      </ion-item>
    </ion-item-group>

  </ion-list>
  <button *ngIf="pagetitle=='收银'" ion-button full round (click)="settle()">结算</button>
  <!--<cash-modals></cash-modals>-->
</ion-content>
